import request from '@/common/utils/request'
import {
	serv
} from '@/common/utils/config'

// 获得发票列表
export function getInvoiceList(data){
	return request(serv.order+'/api/invoices/list',{
		method:'GET',
		data:data
	})
}

// 编辑发票
export function updateInvoice(data){
	return request(serv.order+'/api/invoices/update',{
		method:'POST',
		data:data
	})
}

// 删除发票
export function removeInvoice(data){
	return request(serv.order+'/api/invoices/remove',{
		method:'GET',
		data:data
	})
}

// 新增发票
export function addInvoice(data){
	return request(serv.order+'/api/invoices/add',{
		method:'POST',
		data:data
	})
}

// 发票明细
export function invoiceDetail(data){
	return request(serv.order+'/api/invoices/query',{
		method:'GET',
		data:data
	})
}

// 设置默认地址
export function defaultInvoice(data) {
	return request(serv.order+'/api/invoices/setIsDefault',{
		method:'GET',
		data:data
	})
}
